<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>add_server</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	
	<script type="text/javascript">
	
	
		function set_timerBean_SERVER_ID(){
			
			var SERVER_ID = document.getElementById("SERVER_ID").value;
			var hideSERVER_ID=document.getElementById("hide_SERVER_ID");
			hideSERVER_ID.value=SERVER_ID; //为隐藏域对象的value赋值
		}
	
		function set_timerBean_doMonitorTime(){
			
			var doMonitorTime = document.getElementById("DO_MONITOR_TIME").value;
			var hidedoMonitorTime=document.getElementById("hide_DO_MONITOR_TIME");
			hidedoMonitorTime.value=doMonitorTime; //为隐藏域对象的value赋值
		}
		
		function onsubmitdo(){
			
			document.forms[0].submit();
			document.forms[1].submit();
			
		}
	
	</script>	

  </head>
  
  <body>
  
  	<form action="<%=basePath%>addSerInfo" method="post" name="serverForm" id="serverForm" ">
  	
		DB服务器ID：<s:textfield id="SERVER_ID" name="serverBean.SERVER_ID" onblur="set_timerBean_SERVER_ID();" /><br><br>
		
		DB服务器名：<s:textfield id="SERVER_NAME" name="serverBean.SERVER_NAME" /><br><br>
		
		DB服务器地址(URL)：<s:textfield id="SERVER_URL" name="serverBean.SERVER_URL" /><br><br>
		
		登录用户名：<s:textfield id="DB_USERNAME" type="text" name="serverBean.DB_USERNAME" /><br><br>
		
		登录密码：<s:textfield id="DB_PASSWORD" type="password" name="serverBean.DB_PASSWORD" /><br><br>
		
		待验证数据库名：<s:textfield id="DB_DATABASE_NAME" type="text" name="serverBean.DB_DATABASE_NAME" /><br><br>
		
		待验证的表名：<s:textfield id="SERVER_ID" type="text" name="serverBean.DB_TABLE_NAME" /><br><br>
		
		验证属性名：<s:textfield id="DB_TABLE_NAME" type="text" name="serverBean.DB_COLUMN_NAME" /><br><br>
		
		标准时间：<s:textfield id="DATA_IN_TIME" type="text" name="serverBean.DATA_IN_TIME" /><br><br>
		
  	</form>
  	
  	<form action="<%=basePath%>addTimerInfo" method="post" name="timerForm" id="timerForm">
  	
  		<s:textfield id="hide_SERVER_ID" name="timerBean.SERVER_ID" type="hidden" /><br><br>
  		
  		检测执行时间：<s:textfield id="DO_MONITOR_TIME"  name="timerBean.DO_MONITOR_TIME" /><br><br>
  		
  	</form>
  	
  	
  	<input type="button" id="subButton" value="提交" onclick="onsubmitdo();" />
  	
  </body>
  
</html>
